<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div id="app">
      <ul>
          <li v-for='(item) in list'>{{item}}</li>
      </ul>
      <button @click='change'>change</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    var vm = new Vue({
      el:'#app',
      data:{
          list:['apple','melon','orange']
      },
      methods:{
          change() {
            //   this.list.push("lemon")
            // this.list.unshift('lemon')
            // this.list.pop()
            // this.list.shift()

           /*  this.list = this.list.filter((val,index,arr)=>{
                return val != 'apple'
            }) */

            // this.$set(this.list,3,'lemon')

            this.$delete(this.list,1)


          }
      }
     });
  </script>
</body>
</html>
